


<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/DistributorNews.js此处编写
 -->
 <template>
  <div>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormFileds="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormFileds="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/DistributorNews.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data () {
    return {
      table: {
        key: 'id',
        footer: "Foots",
        cnName: '直营小程序',
        name: 'DistributorNews',
        url: "/DistributorNews/",
        sortName: "createDate"
      },
      extend: extend,
      editFormFields: { "distributorType": "", "distributorCode": "","shareImg":"","diyImg":"", "pay_code": "", "epidemicReminder": "", "productType": "", "distributorName": "", "isMessage": "", "smsMode": "", "smsId": "", "signCode": "", "contactPerson": "", "contactPhone": "", "timeContainer": [], "distributorStartTime": "", "distributorEndTime": "", "isAvailable": "1", "creator": "", "createID": "", "createDate": "", "modifier": "", "modifyID": "", "modifyDate": "", "merchantCode": "", "merchantName": "","appSecret":"","appId":"",isShow: '',scancodeUrl:'' },
      editFormOptions: [[{ "dataKey": "", "data": [], "title": "分销商类型", "field": "distributorType", "type": "select", "required": true, },
      { "dataKey": "Pays", "data": [], "title": "支付方式", "field": "pay_code", "type": "select", "hidden": true },],
      [{ "title": "分销商名称", "field": "distributorName", "type": "text", "hidden": true },
      { "title": "分销商编码", "field": "distributorCode", "type": "text", "readonly": true, "hidden": true }],
      [{ "dataKey": "", "data": [], "title": "产品类型", "field": "productType", "type": "cascaderEl",  "colSize": 6,multiple: true,checkStrictly: true,label: 'typeName', value: 'typeCode', },
      { "title": "起止时间", "required": true, "field": "timeContainer", "colSize": 6, "type": "datetime", "range": true }],
      [{ "title": "疫情提示", "field": "epidemicReminder", "type": "textarea", "hidden": true, "colSize": 12, }],
      [{ "title": "是否发送短信", "field": "isMessage", "type": "switch", "hidden": true,"colSize": 3 },
      { "title": "是否管理员显示", "field": "isShow", "type": "switch", "hidden": true, "colSize": 3 },
      { "dataKey": "sms_mode", "data": [], "title": "短信模式", "field": "smsMode", "type": "select", "hidden": true,"colSize": 3 }],
      [{ "dataKey": "Signs", "data": [], "title": "短信签名", "field": "signCode", "type": "select", "hidden": true },
      { "dataKey": "Messages", "data": [], "title": "短信模板", "field": "smsId", "type": "select", "hidden": true }],
      [{ "title": "appId", "field": "appId", "type": "text", "hidden": true },{"title": "appSecret", "field": "appSecret", "type": "text", "hidden": true }],
      [{ "title": "模板内容", "field": "spare10", "type": "text", "hidden": false, "disabled": true, "colSize": 12, },],
      [{ "title": "联系人", "field": "contactPerson", "type": "text", "hidden": true },
      { "title": "联系人电话", "field": "contactPhone", "type": "text", "hidden": true }],
      [{ "title": "扫码地址", "field": "scancodeUrl", "type": "text", "hidden": true },],
      [{ "title": "分销商首页图", "field": "spare15", "type": "img","hidden": true,storage:'OSS_X'},
      { "title": "分享背景图", "field": "shareImg", "type": "img","hidden": true,storage:'OSS_X'}],
      [{ "title": "自定义图片", "field": "diyImg", "type": "img","hidden": true,storage:'OSS_X'}],
      //   [{"title":"开始时间","field":"distributorStartTime","type":"datetime","hidden":true},
      //    {"title":"结束时间","field":"distributorEndTime","type":"datetime","hidden":true},],
      [{ "title": "创建人", "field": "creator", "disabled": true, "type": "text", "hidden": true },
      { "title": "创建时间", "field": "createDate", "disabled": true, "type": "datetime", "hidden": true }],
      [{ "title": "修改人", "field": "modifier", "disabled": true, "type": "text", "hidden": true },
      { "title": "修改时间", "field": "modifyDate", "disabled": true, "type": "datetime", "hidden": true }]],
      searchFormFields: { "distributorType": "", "distributorName": "", "contactPerson": "", "contactPhone": "", "createDate": "" },
      searchFormOptions: [[{ "title": "分销商名称", "field": "distributorName", "type": "like" },{ "dataKey": "distributor_Type", "data": [], "title": "分销商类型", "field": "distributorType", "type": "select" },  { "title": "联系人", "field": "contactPerson", "type": "like" }, { "title": "联系人电话", "field": "contactPhone", "type": "like" }], [{ "title": "创建时间", "field": "createDate", "type": "datetime" }]],
      columns: [{ field: 'distributorType', title: '分销商类型', type: 'int', bind: { key: 'distributor_Type', data: [] }, width: 120, align: 'left', sortable: true },
      { field: 'distributorCode', title: '分销商编码', type: 'string', width: 220, align: 'left', hidden: true },
      { field: 'distributorName', title: '分销商名称', type: 'int', bind: { key: '', data: [] }, width: 220, align: 'left' },
      { field: 'productType', title: '产品类型', type: 'selectList', bind: { key: '', data: [], }, width: 120, align: 'left' },
      { field: 'pay_code', title: '支付方式', type: 'int', bind: { key: 'Pays', dat: [] }, width: 220, align: 'left', sortable: true },
      { field: 'isMessage', title: '是否发送短信', type: 'sbyte', bind: { key: 'enable', data: [] }, width: 120, align: 'left' },
      { field: 'smsName', title: '短信模板编码', type: 'string', bind: { key: 'Messages', data: [] }, width: 120, hidden: true, align: 'left' },
      { field: 'smsId', title: '短信模板名称', type: 'int', bind: { key: 'Messages', data: [] }, width: 150, align: 'left' },
      { field: 'smsModeName', title: '短信模式', type: 'string', bind: { key: 'sms_mode', data: [] }, width: 120, hidden: true, align: 'left' },
      { field: 'smsMode', title: '短信模式', type: 'int', bind: { key: 'sms_mode', data: [] }, width: 150, align: 'left' },
      { field: 'signName', title: '短信签名编码', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'signCode', title: '短信签名名称', type: 'int', bind: { key: 'Signs', data: [] }, width: 180, align: 'left' },
      { field: 'contactPerson', title: '联系人', type: 'string', width: 120, align: 'left' },
      { field: 'contactPhone', title: '联系人电话', type: 'string', width: 150, align: 'left' },
      { field: 'distributorStartTime', title: '合约开始时间', type: 'datetime', width: 220, align: 'left', sortable: true },
      { field: 'distributorEndTime', title: '合约结束时间', type: 'datetime', width: 220, align: 'left', sortable: true },
      { field: 'isAvailable', title: '是否可用', type: 'sbyte', hidden: true, width: 120, align: 'left' },
      { field: 'creator', title: '创建人', type: 'string', width: 120, readonly: true, align: 'left' },
      { field: 'createDate', title: '创建时间', type: 'datetime', width: 220, readonly: true, align: 'left', sortable: true },
      { field: 'modifier', title: '修改人', type: 'string', width: 120, readonly: true, align: 'left' },
      { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 220, readonly: true, align: 'left', sortable: true },
      { field: 'accountsId', title: '应收账户', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare2', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare15', title: '分销商封面图', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'shareImg', title: '分享背景图', type: 'string', width: 120,  align: 'left' },
      { field: 'diyImg', title: '自定义图', type: 'string', width: 120,  align: 'left' },
      { field: 'spare14', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare13', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare12', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare11', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'spare10', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'roleId', title: '弃用', type: 'int', width: 120, hidden: true, align: 'left' },
      { field: 'modifyID', title: '修改人ID', type: 'int', width: 120, hidden: true, align: 'left' },
      { field: 'createID', title: '创建人ID', type: 'int', width: 120, hidden: true, align: 'left' },
      { field: 'spare8', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
      { field: 'id', title: '主键', type: 'string', width: 120, hidden: true, readonly: true, require: true, align: 'left' },
      { field: 'isDelete', title: '是否删除', type: 'int', width: 120, hidden: true, require: true, align: 'left' },
      { field: 'spare9', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' }],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: ""
      }
    };
  }
};
export default vueParam;
</script>
